package com.jeesite.modules.pt.service;

import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.pt.entity.PtShichangBuzhou;
import com.jeesite.modules.pt.dao.PtShichangBuzhouDao;
import com.jeesite.modules.file.utils.FileUploadUtils;

/**
 * pt_shichang_buzhouService
 * @author 李寒冰
 * @version 2025-04-07
 */
@Service
public class PtShichangBuzhouService extends CrudService<PtShichangBuzhouDao, PtShichangBuzhou> {
	
	/**
	 * 获取单条数据
	 * @param ptShichangBuzhou
	 * @return
	 */
	@Override
	public PtShichangBuzhou get(PtShichangBuzhou ptShichangBuzhou) {
		return super.get(ptShichangBuzhou);
	}
	
	/**
	 * 查询分页数据
	 * @param ptShichangBuzhou 查询条件
	 * @param ptShichangBuzhou page 分页对象
	 * @return
	 */
	@Override
	public Page<PtShichangBuzhou> findPage(PtShichangBuzhou ptShichangBuzhou) {
		return super.findPage(ptShichangBuzhou);
	}
	
	/**
	 * 查询列表数据
	 * @param ptShichangBuzhou
	 * @return
	 */
	@Override
	public List<PtShichangBuzhou> findList(PtShichangBuzhou ptShichangBuzhou) {
		return super.findList(ptShichangBuzhou);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param ptShichangBuzhou
	 */
	@Override
	@Transactional
	public void save(PtShichangBuzhou ptShichangBuzhou) {
		super.save(ptShichangBuzhou);
		// 保存上传图片
		FileUploadUtils.saveFileUpload(ptShichangBuzhou, ptShichangBuzhou.getId(), "ptShichangBuzhou_image");
	}
	
	/**
	 * 更新状态
	 * @param ptShichangBuzhou
	 */
	@Override
	@Transactional
	public void updateStatus(PtShichangBuzhou ptShichangBuzhou) {
		super.updateStatus(ptShichangBuzhou);
	}
	
	/**
	 * 删除数据
	 * @param ptShichangBuzhou
	 */
	@Override
	@Transactional
	public void delete(PtShichangBuzhou ptShichangBuzhou) {
		super.delete(ptShichangBuzhou);
	}
	
}